package com.hankol.feature_wine_meal.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hankol.feature_wine_meal.R
import com.hankol.feature_wine_meal.bean.FoodDetailsBean
import com.hankol.feature_wine_meal.bean.MainFood
import com.hankol.feature_wine_meal.bean.MaterialsInfoBean

/**
 * @author: 关忆北、
 * @date: 2022/6/22
 * @Des：
 */
class MaterialsInfoAdapter : BaseQuickAdapter<MainFood, BaseViewHolder>(R.layout.item_materials_info) {
    override fun convert(helper: BaseViewHolder, item: MainFood) {
        helper.setText(R.id.tv_materials_info_name, item.name)
                .setText(R.id.tv_materials_info_kg, item.desc)
                .setGone(R.id.tv_materials_info_view, helper.adapterPosition % 2 == 0)
    }
}